package org.boot.easyapi.core.controller.view.table.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
public class TableViewVO {

    @Schema(title = "表名", required = true)
    private String tableName;

    @Schema(title = "表注释", required = true)
    private String tableComment;

    @Schema(title = "字段列表", required = true)
    private List<TableFieldVO> fields;

    @Data
    public static class TableFieldVO{

        @Schema(title = "字段名", required = true)
        private String name;

        @Schema(title = "字段类型", required = true)
        private String type;

        @Schema(title = "字段长度")
        private Integer size;

        @Schema(title = "字段精度")
        private Integer precision;

        @Schema(title = "是否为空")
        private Boolean nullable;

        @Schema(title = "字段注释")
        private String comment;

    }

}
